package com.baidu.controller;

import com.baidu.annotation.TokenAnnotation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("toke")
public class TokeController {

    @RequestMapping("test")
    @ResponseBody
    @TokenAnnotation
    public Map testToke(String str){
        System.out.print("============");
        HashMap<Object, Object> map = new HashMap<>();
        System.out.println(map);
        map.put("code", 0);
        map.put("data", 123);
        return map;
    }
}
